<%@ Control Language="C#" AutoEventWireup="true" Codebehind="Logs.ascx.cs" Inherits="Doctors_WebForum.Admin.UIControls.Logs" %>
<div class="tab_content">
    <div class="pageIntro">
        <h2>
            Managerment Logs event of systems</h2>
        <p>
            Here's administrator can update/view/delete information about log event from systems.</p>
    </div>
    <div class="contentBox">
        <div class="contentBoxTop">
            <h3>
                <asp:LinkButton ID="lbkListUser" runat="server" OnClick="lbkListUser_Click">List information about logs event from systems</asp:LinkButton></h3>
            <label id="search" class="smallInput">
                Quick Find :
                <asp:TextBox ID="txtSearch" runat="server" OnTextChanged="txtSearch_TextChanged"></asp:TextBox>
            </label>
        </div>
        <div class="innerContent">
            <!--Message will active if cann not load data-->
            <asp:Label ID="lblMessage" runat="server"></asp:Label>
            <!--Load list users with paging using datalist controls-->
            <asp:DataList ID="dtlUser" runat="server" CssClass="sTable" DataKeyField="LogID"
                OnEditCommand="dtlUser_EditCommand" OnCancelCommand="dtlUser_CancelCommand" OnUpdateCommand="dtlUser_UpdateCommand"
                OnDeleteCommand="dtlUser_DeleteCommand">
                <HeaderTemplate>
                    <thead id="table_header">
                        <tr>
                            <th>
                                <strong>
                                    <asp:LinkButton ID="lbkLogID" OnClick="LogID" runat="server">LogID</asp:LinkButton></strong></th>
                            <th>
                                <strong>LogName</strong></th>
                            <th>
                                <strong>
                                    <asp:LinkButton ID="lbkLogDate" OnClick="LogDate" runat="server">LogDate</asp:LinkButton></strong></th>
                            <th>
                                <strong style="float: right; margin-right: 50px;">Edit</strong></th>
                        </tr>
                    </thead>
                </HeaderTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
                <ItemTemplate>
                    <tr class="oddRow">
                        <td class="firstCol">
                            <a href="Default.aspx?view=Logs&ID=<%#Eval("LogID") %>">
                                <%#Eval("LogID")%>
                            </a>
                        </td>
                        <td class="secondCol">
                            <%#Eval("LogName")%>
                        </td>
                        <td>
                            <%#Eval("LoggedDate")%>
                        </td>
                        <td class="editItem">
                            <ul>
                                <li class="iconEdit">
                                    <asp:LinkButton Text="edit" CommandName="Edit" runat="server" ID="lbtnEdit" />
                                </li>
                                <li class="iconDel">
                                    <asp:LinkButton Text="delete" CommandName="Delete" runat="server" ID="lbtnDelete"  OnClientClick ="return confirm ('Are you sure want to delete ?')"/>
                                </li>
                            </ul>
                        </td>
                    </tr>
                </ItemTemplate>
                <EditItemTemplate>
                    <tr class="edit_content">
                        <td>
                            <%#Eval("LogID")%>
                        </td>
                        <td class="secondCol">
                            <asp:TextBox TextMode="MultiLine" ID="txtUserName" Width="100%" runat="server" Text='<%#Eval("LogName") %>'>
                            </asp:TextBox>
                        </td>
                        <td>
                            <%# Eval("LoggedDate")%>
                        </td>
                        <td class="editItem">
                            <ul>
                                <li class="iconCancel">
                                    <asp:LinkButton Text="cancel" CommandName="Cancel" runat="server" ID="lbtnCancel" />
                                </li>
                                <li class="iconUpdate">
                                    <asp:LinkButton Text="update" CommandName="Update" runat="server" ID="lbtnUpdate" />
                                </li>
                            </ul>
                        </td>
                    </tr>
                </EditItemTemplate>
            </asp:DataList>
            <asp:Label ID="lblResultPaging" runat="server" Visible="false"></asp:Label>
            <%--Popup windown --%>
            <%-- The end Popup windown --%>
            <table border="0" cellpadding="0" cellspacing="0" id="pagging_box">
                <tr>
                    <td valign="middle">
                        <asp:LinkButton ID="lbtnPrevious" runat="server" Text="Previous Page" class="selected"
                            OnClick="lbtnPrevious_Click">Previous</asp:LinkButton>
                    </td>
                    <td valign="middle" align="right">
                        <asp:DataList ID="DLPAGING" runat="server" RepeatDirection="Horizontal" OnItemCommand="DLPAGING_ItemCommand">
                            <ItemTemplate>
                                <asp:LinkButton ID="imgbtnNumber" class="selected" runat="server" Text='<%# Eval("DisplayName") %>'
                                    Visible='<%# Eval("LinkButtonVisible") %>' CommandArgument='<%# Eval("Value") %>'
                                    CommandName="Paging" />
                                <asp:Label class="paging" ID="lblNumber" runat="server" ToolTip="Selected Page" Visible='<%# Eval("LabelVisible") %>'
                                    Text='<%# "&nbsp;"+ Eval("DisplayName") + "&nbsp;"%>'></asp:Label>
                            </ItemTemplate>
                        </asp:DataList>
                    </td>
                    <td valign="middle">
                        <asp:LinkButton ID="lbtnNext" runat="server" class="selected" Text="Next Page" OnClick="NextPage">Next</asp:LinkButton>
                    </td>
                </tr>
            </table>
        </div>
        <!--end of #box-3-->
    </div>
</div>
